const request = function (obj) {
  const { url, method, data } = obj
  return new Promise((res,rej) => {
    const xml=new XMLHttpRequest()
    xml.open(url, method)
    xml.send
    xml.onreadystatechange(() => {
      if (xml.state === 4) {
        if (xml.status === 200) {
          res(statusText)
        }
      }
    })
  })
}